/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.zcm.modules.center.service;

import java.util.List;

import com.zcm.modules.center.dao.CenterUserDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zcm.common.persistence.Page;
import com.zcm.common.service.CrudService;
import com.zcm.modules.center.entity.CenterUser;
import com.zcm.modules.center.dao.CenterUserDao;

/**
 * 用户中心Service
 * @author www
 * @version 2018-04-20
 */
@Service
@Transactional(readOnly = true)
public class CenterUserService extends CrudService<CenterUserDao, CenterUser> {

	public CenterUser get(String id) {
		return super.get(id);
	}
	
	public List<CenterUser> findList(CenterUser centerUser) {
		return super.findList(centerUser);
	}
	
	public Page<CenterUser> findPage(Page<CenterUser> page, CenterUser centerUser) {
		return super.findPage(page, centerUser);
	}
	
	@Transactional(readOnly = false)
	public void save(CenterUser centerUser) {
		super.save(centerUser);
	}
	
	@Transactional(readOnly = false)
	public void delete(CenterUser centerUser) {
		super.delete(centerUser);
	}

	public CenterUser getUserByLoginName(String loginName) {
		return dao.getUserByLoginName(loginName);
	}

    public CenterUser getUserByMobile(String mobile) {
        return dao.getUserByMobile(mobile);
    }
}